package com.example.perplonews.a_d_fragment.b_perplo.adapter

import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.request.RequestOptions
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.example.perplonews.R
import com.example.perplonews.a_b_entity.BaseEntity
import com.example.perplonews.a_b_entity.FollowAntivity
import com.example.perplonews.a_d_fragment.c_video.entity.Data
import com.example.perplonews.a_d_fragment.c_video.entity.SmallVideo

class Recom_Adapter(list: ArrayList<Data>) :BaseQuickAdapter<Data,BaseViewHolder>(R.layout.follow_item,list) {
    override fun convert(helper: BaseViewHolder, item: Data) {
        helper.setText(R.id.follow_name,item.category)
        helper.setText(R.id.follow_title,item.author_name+"--中国人的心灵读本，全家人的精神纽带")
        helper.setText(R.id.follow_data,item.date)
        helper.setText(R.id.follow_msg,item.title)
        Glide.with(mContext).load(item.thumbnail_pic_s03).into(helper.getView(R.id.follow_img2))
        Glide.with(mContext).load("https://i02piccdn.sogoucdn.com/0de8dcfc26ef408f")
            .apply(RequestOptions.bitmapTransform(CircleCrop())).into(helper.getView(R.id.follow_img))


    }

}